package com.xinqi.common.core.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BasicEnum;
import lombok.Getter;

public enum AssistantReceiveEnum {

    STUDENT(0, "学生"),
    TEACHER(1, "教师"),
    ALL(2, "全部");

    @Getter(onMethod_ = {@JsonValue})
    private final int code;

    @Getter
    private final String describe;

    AssistantReceiveEnum(int code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static AssistantStateEnum of(Integer code) {
        return BasicEnum.of(AssistantStateEnum.class, code);
    }
}
